home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / mailx6 / _setup.2 / Group4 / OCXMAIN2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-07-14  |  3.7 KB  |  124 lines

  1. VERSION 4.00
  2. Begin VB.Form SessionForm 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Mail X Example Read Msg"
  5.    ClientHeight    =   3915
  6.    ClientLeft      =   1905
  7.    ClientTop       =   2190
  8.    ClientWidth     =   5490
  9.    BeginProperty Font 
  10.       name            =   "MS Sans Serif"
  11.       charset         =   1
  12.       weight          =   700
  13.       size            =   8.25
  14.       underline       =   0   'False
  15.       italic          =   0   'False
  16.       strikethrough   =   0   'False
  17.    EndProperty
  18.    Height          =   4290
  19.    Left            =   1860
  20.    LinkTopic       =   "Form2"
  21.    ScaleHeight     =   3915
  22.    ScaleWidth      =   5490
  23.    Top             =   1860
  24.    Width           =   5580
  25.    Begin VB.ListBox MsgList 
  26.       Height          =   3150
  27.       Left            =   120
  28.       TabIndex        =   2
  29.       Top             =   120
  30.       Width           =   5175
  31.    End
  32.    Begin VB.CommandButton BtnOpen 
  33.       Caption         =   "Open Msg"
  34.       Height          =   375
  35.       Left            =   3120
  36.       TabIndex        =   1
  37.       Top             =   3360
  38.       Width           =   1335
  39.    End
  40.    Begin VB.CommandButton BtnEnd 
  41.       Caption         =   "End"
  42.       Height          =   375
  43.       Left            =   960
  44.       TabIndex        =   0
  45.       Top             =   3360
  46.       Width           =   1335
  47.    End
  48.    Begin Mailx16Lib.MSess MSess1 
  49.       Left            =   2520
  50.       Top             =   3360
  51.       _version        =   65542
  52.       _extentx        =   900
  53.       _extenty        =   900
  54.       _stockprops     =   0
  55.    End
  56.    Begin Mailx16Lib.MMsg MMsg1 
  57.       Left            =   4680
  58.       Top             =   3360
  59.       _version        =   65542
  60.       _extentx        =   900
  61.       _extenty        =   900
  62.       _stockprops     =   0
  63.       displayerrors   =   0   'False
  64.       bindstring      =   "MSess1"
  65.       fastfetch       =   -1  'True
  66.    End
  67.    Begin Mailx16Lib.MForm MForm1 
  68.       Left            =   15
  69.       Top             =   3600
  70.       _version        =   65542
  71.       _extentx        =   3413
  72.       _extenty        =   500
  73.       _stockprops     =   0
  74.       mxformname      =   "FormTag1"
  75.    End
  76. Attribute VB_Name = "SessionForm"
  77. Attribute VB_Creatable = False
  78. Attribute VB_Exposed = False
  79. Private Sub BtnEnd_Click()
  80.     End
  81. End Sub
  82. Private Sub BtnOpen_Click()
  83.     Dim Index As Integer
  84.     Dim FileNum As Integer
  85.     Index = MsgList.ListIndex
  86.     If Index <> -1 Then
  87.         Load MsgForm
  88.         MsgForm.MMsg1.FetchMsg = Index + 1
  89.         MsgForm.szSubject = MsgForm.MMsg1.Subject
  90.         MsgForm.szNoteText = MsgForm.MMsg1.NoteText
  91.         MsgForm.szTime = MsgForm.MMsg1.TimeReceived
  92.         MsgForm.szMsgID = MsgForm.MMsg1.MsgID
  93.         MsgForm.MReci1 = MsgForm.MMsg1
  94.         MsgForm.szOriginator = MsgForm.MReci1.RecipientName
  95.         MsgForm.MFile1 = MsgForm.MMsg1
  96.         FileNum = MsgForm.MFile1.FileCount
  97.         For Index = 1 To FileNum
  98.             MsgForm.MFile1.FileNum = Index
  99.             MsgForm.szFileList.AddItem MsgForm.MFile1.filename
  100.         Next
  101.         If FileNum > 0 Then MsgForm.szFileList.ListIndex = 0
  102.         MsgForm.Show 1
  103.     Else
  104.         MsgBox "Select a Mail Message"
  105.     End If
  106. End Sub
  107. Private Sub Command2_Click()
  108. End Sub
  109. Private Sub Form_Load()
  110.     Load SystemX
  111.     SystemX.MsMail = False
  112.     SystemX.Show 1
  113.     MSess1.Logon = True
  114.     If MSess1.Logon = False Then End
  115.     MsgList.Clear
  116.     MMsg1.Action = ACTION_FINDFIRST
  117.     Do
  118.         If MMsg1.FetchMsg <> 0 Then
  119.             MsgList.AddItem MMsg1.Subject
  120.             MMsg1.Action = ACTION_FINDNEXT
  121.         End If
  122.     Loop While MMsg1.FetchMsg <> 0
  123. End Sub
  124.